import { Component, OnInit } from '@angular/core';

import { UserName } from '../app.interface';

@Component({
  selector: 'app-template-form',
  templateUrl: './template-form.component.html',
  styleUrls: ['./template-form.component.scss']
})
export class TemplateFormComponent implements OnInit {
  // 绑定值;
  public user: UserName = {
    name: 'sunxt',
    account: {
      email: '',
      confirm: '',
    },
  };
  // 事件绑定
  onSubmit({ value, valid }: { value: UserName, valid: boolean }) {
    console.log(value, valid);
  }

  constructor() { }

  ngOnInit() {
  }

}
